#输出九九乘法表

for i in range(1,10):
    for j in range(1,i):
        print ("{}*{}={:<2}".format(j,i,i*j),end=" ")
    print("{}*{}={:<2}".format(i,i,i*i))


print("")
#输出九九乘法表

for i in range(9,0,-1):
    for j in range(1,i):
        print ("{}*{}={:<2}".format(j,i,i*j),end=" ")
    print("{}*{}={:<2}".format(i,i,i*i))


 
print("="*60)

#输出九九乘法表

for i in range(1,10):
    for j in range(1,i+1):
        print ("{}*{}={:<2}".format(j,i,i*j),end=" ")
    print("")


print("")
#输出九九乘法表

for i in range(9,0,-1):
    for j in range(1,i+1):
        print ("{}*{}={:<2}".format(j,i,i*j),end=" ")
    print("")

print("="*60)

#输出九九乘法表
i=1
while i<10:
    j=1
    while j<=i:
        print ("{}*{}={:<2}".format(j,i,i*j),end=" ")
        j+=1;
    print("")
    i+=1;

print("")
#输出九九乘法表
i=9
while i>0:
    j=1
    while j<=i:
        print ("{}*{}={:<2}".format(j,i,i*j),end=" ")
        j+=1;
    print("")
    i-=1;
